function save(){
	var errorMsg = $("#error_message");
	var hasPassword = $("#hasPassword").val();
	var oldPassword = $("#oldPassword").val();
	var newPassword = $("#newPassword").val();
	var reNewPassword = $("#reNewPassword").val();
	var emailCode = $("#emailCode").val();
	
	if (hasPassword == 1 && oldPassword.length == 0) {
		errorMsg.html("请输入旧支付密码");
		return;
	}
	if (newPassword.length == 0) {
		errorMsg.html("请输入新支付密码");
		return;
	}
	if (reNewPassword.length == 0) {
		errorMsg.html("请再次输入新支付密码");
		return;
	}
	if(reNewPassword != newPassword){
		errorMsg.html("两次输入的密码不一致");
		return;
	}
	if (emailCode.length == 0) {
		errorMsg.html("请输入验证码");
		return;
	}
	$.ajax({
		type : 'POST',
		url : ctx + '/memberCenter/alterPayPassword.do',
		data : {
			oldPassword: oldPassword,
			newPassword: newPassword,
			code: emailCode
		},
		dataType : 'json',
		timeout : 30000,
		context : $('body'),
		success : function(data) {
			if (data.code == "ok") {
				showTip2("支付密码修改成功!");
				window.location.reload();
			} else {
				errorMsg.html(data.msg);
			}
		},
		error : function(xhr, type) {
			errorMsg.html('提交失败!');
		}
	});
	
}

